package com.hdax.dm.controller;

import com.hdax.dm.dto.CarouselDto;
import com.hdax.dm.entity.base.Image;
import com.hdax.dm.service.ImageService;
import com.hdax.dm.utils.response.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/base/index")
public class CarouselController {

    @Autowired
    private ImageService imageService;

    @PostMapping("carousel")
    private CommonResponse<List<Image>> carousel(){
        return imageService.carousel();
    }

  /*  @PostMapping("getCarouselData")
    private CommonResponse<List<Image>> getCarouselData(@RequestBody Map<String,Integer> map){
        return imageService.CarouselData(map.get("itemTypeId"));
    }*/
}
